home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / MIDI.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  24.4 KB  |  903 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        MIDI.a
  3. ;
  4. ;    Contains:    MIDI Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1988-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__MIDI__') = 'UNDEFINED' THEN
  19. __MIDI__ SET 1
  20.  
  21.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  22.     include 'Errors.a'
  23.     ENDIF
  24.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  25.     include 'MacTypes.a'
  26.     ENDIF
  27.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  28.     include 'MixedMode.a'
  29.     ENDIF
  30.  
  31. ;                        * * *  N O T E  * * * 
  32. ;
  33. ;    This file has been updated to include MIDI 2.0 interfaces.  
  34. ;    
  35. ;    The MIDI 2.0 interfaces were developed for the classic 68K runtime.
  36. ;    Since then, Apple has created the PowerPC and CFM 68K runtimes.
  37. ;    Currently, the extra functions in MIDI 2.0 are not in InterfaceLib
  38. ;    and thus not callable from PowerPC and CFM 68K runtimes (you'll
  39. ;    get a linker error).  
  40. ;
  41.  
  42.  
  43.  
  44. midiMaxNameLen                    EQU        31                    ;maximum number of characters in port and client names
  45.  
  46.                                                             ; Time formats 
  47. midiFormatMSec                    EQU        0                    ;milliseconds
  48. midiFormatBeats                    EQU        1                    ;beats
  49. midiFormat24fpsBit                EQU        2                    ;24 frames/sec.
  50. midiFormat25fpsBit                EQU        3                    ;25 frames/sec.
  51. midiFormat30fpsDBit                EQU        4                    ;30 frames/sec. drop-frame
  52. midiFormat30fpsBit                EQU        5                    ;30 frames/sec.
  53. midiFormat24fpsQF                EQU        6                    ;24 frames/sec. longInt format 
  54. midiFormat25fpsQF                EQU        7                    ;25 frames/sec. longInt format 
  55. midiFormat30fpsDQF                EQU        8                    ;30 frames/sec. drop-frame longInt format 
  56. midiFormat30fpsQF                EQU        9                    ;30 frames/sec. longInt format 
  57.  
  58. midiInternalSync                EQU        0                    ;internal sync
  59. midiExternalSync                EQU        1                    ;external sync
  60.  
  61.                                                             ; Port types
  62. midiPortTypeTime                EQU        0                    ;time port
  63. midiPortTypeInput                EQU        1                    ;input port
  64. midiPortTypeOutput                EQU        2                    ;output port
  65. midiPortTypeTimeInv                EQU        3                    ;invisible time port
  66. midiPortInvisible                EQU        $8000                ;logical OR this to other types to make invisible ports
  67. midiPortTypeMask                EQU        $0007                ;logical AND with this to convert new port types to old, i.e. to strip the property bits
  68.  
  69.                                                             ; OffsetTimes  
  70. midiGetEverything                EQU        $7FFFFFFF            ;get all packets, regardless of time stamps
  71. midiGetNothing                    EQU        $80000000            ;get no packets, regardless of time stamps
  72. midiGetCurrent                    EQU        $00000000            ;get current packets only
  73. ;     MIDI data and messages are passed in MIDIPacket records (see below).
  74. ;    The first byte of every MIDIPacket contains a set of flags
  75. ;
  76. ;    bits 0-1    00 = new MIDIPacket, not continued
  77. ;                     01 = begining of continued MIDIPacket
  78. ;                     10 = end of continued MIDIPacket
  79. ;                     11 = continuation
  80. ;    bits 2-3     reserved
  81. ;
  82. ;    bits 4-6      000 = packet contains MIDI data
  83. ;
  84. ;                  001 = packet contains MIDI Manager message
  85. ;
  86. ;    bit 7         0 = MIDIPacket has valid stamp
  87. ;                  1 = stamp with current clock
  88. ;
  89.  
  90.  
  91. midiContMask                    EQU        $03
  92. midiNoCont                        EQU        $00
  93. midiStartCont                    EQU        $01
  94. midiMidCont                        EQU        $03
  95. midiEndCont                        EQU        $02
  96. midiTypeMask                    EQU        $70
  97. midiMsgType                        EQU        $00
  98. midiMgrType                        EQU        $10
  99. midiTimeStampMask                EQU        $80
  100. midiTimeStampCurrent            EQU        $80
  101. midiTimeStampValid                EQU        $00
  102.  
  103.                                                             ; MIDIPacket command words (the first word in the data field for midiMgrType messages) 
  104. midiOverflowErr                    EQU        $0001
  105. midiSCCErr                        EQU        $0002
  106. midiPacketErr                    EQU        $0003                ;all command words less than this value are error indicators
  107. midiMaxErr                        EQU        $00FF
  108.  
  109.                                                             ; Valid results to be returned by readHooks 
  110. midiKeepPacket                    EQU        0
  111. midiMorePacket                    EQU        1
  112. midiNoMorePacket                EQU        2
  113. midiHoldPacket                    EQU        3
  114.  
  115.                                                             ; Driver calls 
  116. midiOpenDriver                    EQU        1
  117. midiCloseDriver                    EQU        2
  118.  
  119. mdvrAbortNotesOff                EQU        0                    ;abort previous mdvrNotesOff request
  120. mdvrChanNotesOff                EQU        1                    ;generate channel note off messages
  121. mdvrAllNotesOff                    EQU        2                    ;generate all note off messages
  122.  
  123. mdvrStopOut                        EQU        0                    ;stop calling MDVROut temporarily
  124. mdvrStartOut                    EQU        1                    ;resume calling MDVROut
  125. MIDIPacket                RECORD 0
  126. flags                     ds.b    1                ; offset: $0 (0)
  127. len                         ds.b    1                ; offset: $1 (1)
  128. tStamp                     ds.l    1                ; offset: $2 (2)
  129. data                     ds.b    249                ; offset: $6 (6)
  130.                          ORG 256
  131. sizeof                     EQU *                    ; size:   $100 (256)
  132.                         ENDR
  133. ; typedef struct MIDIPacket *            MIDIPacketPtr
  134.  
  135. MIDIClkInfo                RECORD 0
  136. syncType                 ds.w    1                ; offset: $0 (0)        ; synchronization external/internal
  137. curTime                     ds.l    1                ; offset: $2 (2)        ; current value of port's clock
  138. format                     ds.w    1                ; offset: $6 (6)        ; time code format
  139. sizeof                     EQU *                    ; size:   $8 (8)
  140.                         ENDR
  141. MIDIIDRec                RECORD 0
  142. clientID                 ds.l    1                ; offset: $0 (0)
  143. portID                     ds.l    1                ; offset: $4 (4)
  144. sizeof                     EQU *                    ; size:   $8 (8)
  145.                         ENDR
  146. MIDIPortInfo            RECORD 0
  147. portType                 ds.w    1                ; offset: $0 (0)        ; type of port
  148. timeBase                 ds        MIDIIDRec        ; offset: $2 (2)        ; MIDIIDRec for time base
  149. numConnects                 ds.w    1                ; offset: $A (10)        ; number of connections
  150. cList                     ds        MIDIIDRec        ; offset: $C (12) <-- really an array of length one ; ARRAY [1..numConnects] of MIDIIDRec
  151. sizeof                     EQU *                    ; size:   $14 (20)
  152.                         ENDR
  153. ; typedef struct MIDIPortInfo *            MIDIPortInfoPtr
  154.  
  155. ; typedef MIDIPortInfoPtr *                MIDIPortInfoHdl
  156.  
  157. ; typedef MIDIPortInfoPtr *                MIDIPortInfoHandle
  158.  
  159. MIDIPortParams            RECORD 0
  160. portID                     ds.l    1                ; offset: $0 (0)        ; ID of port, unique within client
  161. portType                 ds.w    1                ; offset: $4 (4)        ; Type of port - input, output, time, etc.
  162. timeBase                 ds.w    1                ; offset: $6 (6)        ; refnum of time base, 0 if none
  163. offsetTime                 ds.l    1                ; offset: $8 (8)        ; offset for current time stamps
  164. readHook                 ds.l    1                ; offset: $C (12)        ; routine to call when input data is valid
  165. refCon                     ds.l    1                ; offset: $10 (16)        ; refcon for port (for client use)
  166. initClock                 ds        MIDIClkInfo        ; offset: $14 (20)        ; initial settings for a time base
  167. name                     ds        Str255            ; offset: $1C (28)        ; name of the port, This is a real live string, not a ptr.
  168. sizeof                     EQU *                    ; size:   $11C (284)
  169.                         ENDR
  170. ; typedef struct MIDIPortParams *        MIDIPortParamsPtr
  171.  
  172. MIDIIDList                RECORD 0
  173. numIDs                     ds.w    1                ; offset: $0 (0)
  174. list                     ds.l    1                ; offset: $2 (2) <-- really an array of length one
  175. sizeof                     EQU *                    ; size:   $6 (6)
  176.                         ENDR
  177. ; typedef struct MIDIIDList *            MIDIIDListPtr
  178.  
  179. ; typedef MIDIIDListPtr *                MIDIIDListHdl
  180.  
  181. ; typedef MIDIIDListPtr *                MIDIIDListHandle
  182.  
  183. ;  MDVR Control structs
  184. MDVRInCtlRec            RECORD 0
  185. timeCodeClock             ds.w    1                ; offset: $0 (0)        ; refnum of time base for time code
  186. timeCodeFormat             ds.w    1                ; offset: $2 (2)        ; format of time code output
  187. readProc                 ds.l    1                ; offset: $4 (4)        ; proc to call with intput characters
  188. commProc                 ds.l    1                ; offset: $8 (8)        ; proc to call for handshaking
  189. refCon                     ds.l    1                ; offset: $C (12)        ; refCon passed to readProc, commProc
  190. sizeof                     EQU *                    ; size:   $10 (16)
  191.                         ENDR
  192. ; typedef struct MDVRInCtlRec *            MDVRInCtlPtr
  193.  
  194. MDVROutCtlRec            RECORD 0
  195. timeCodeClock             ds.w    1                ; offset: $0 (0)        ; time base driven by time code
  196. timeCodeFormat             ds.w    1                ; offset: $2 (2)        ; format of time code to listen to
  197. timeCodeProc             ds.l    1                ; offset: $4 (4)        ; proc called on time code fmt change
  198. commProc                 ds.l    1                ; offset: $8 (8)        ; proc called for handshaking
  199. refCon                     ds.l    1                ; offset: $C (12)        ; refCon passed to timeCodeProc
  200. timeCodeFilter             ds.b    1                ; offset: $10 (16)        ; filter time code if true
  201. padding                     ds.b    1                ; offset: $11 (17)        ; unused pad byte
  202. midiMsgTicks             ds.l    1                ; offset: $12 (18)        ; value of Ticks when MIDI msg rcvd
  203. timeCodeTicks             ds.l    1                ; offset: $16 (22)        ; value of Ticks when time code rcvd
  204. sizeof                     EQU *                    ; size:   $1A (26)
  205.                         ENDR
  206. ; typedef struct MDVROutCtlRec *        MDVROutCtlPtr
  207.  
  208. ; typedef void *                        MDVRPtr
  209.  
  210. ;
  211. ; pascal NumVersion MIDIVersion(void )
  212. ;
  213.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  214.         Macro
  215.         _MIDIVersion
  216.             move.l              #$00000004,D0
  217.             dc.w                $A800
  218.         EndM
  219.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  220.         IMPORT_CFM_FUNCTION MIDIVersion
  221.     ENDIF
  222.  
  223. ;
  224. ; pascal OSErr MIDISignIn(OSType clientID, long refCon, Handle icon, ConstStr255Param name)
  225. ;
  226.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  227.         Macro
  228.         _MIDISignIn
  229.             move.l              #$00040004,D0
  230.             dc.w                $A800
  231.         EndM
  232.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  233.         IMPORT_CFM_FUNCTION MIDISignIn
  234.     ENDIF
  235.  
  236. ;
  237. ; pascal void MIDISignOut(OSType clientID)
  238. ;
  239.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  240.         Macro
  241.         _MIDISignOut
  242.             move.l              #$00080004,D0
  243.             dc.w                $A800
  244.         EndM
  245.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  246.         IMPORT_CFM_FUNCTION MIDISignOut
  247.     ENDIF
  248.  
  249. ;
  250. ; pascal MIDIIDListHandle MIDIGetClients(void )
  251. ;
  252.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  253.         Macro
  254.         _MIDIGetClients
  255.             move.l              #$000C0004,D0
  256.             dc.w                $A800
  257.         EndM
  258.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  259.         IMPORT_CFM_FUNCTION MIDIGetClients
  260.     ENDIF
  261.  
  262. ;
  263. ; pascal void MIDIGetClientName(OSType clientID, Str255 name)
  264. ;
  265.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  266.         Macro
  267.         _MIDIGetClientName
  268.             move.l              #$00100004,D0
  269.             dc.w                $A800
  270.         EndM
  271.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  272.         IMPORT_CFM_FUNCTION MIDIGetClientName
  273.     ENDIF
  274.  
  275. ;
  276. ; pascal void MIDISetClientName(OSType clientID, ConstStr255Param name)
  277. ;
  278.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  279.         Macro
  280.         _MIDISetClientName
  281.             move.l              #$00140004,D0
  282.             dc.w                $A800
  283.         EndM
  284.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  285.         IMPORT_CFM_FUNCTION MIDISetClientName
  286.     ENDIF
  287.  
  288. ;
  289. ; pascal MIDIIDListHandle MIDIGetPorts(OSType clientID)
  290. ;
  291.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  292.         Macro
  293.         _MIDIGetPorts
  294.             move.l              #$00180004,D0
  295.             dc.w                $A800
  296.         EndM
  297.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  298.         IMPORT_CFM_FUNCTION MIDIGetPorts
  299.     ENDIF
  300.  
  301. ;
  302. ; pascal OSErr MIDIAddPort(OSType clientID, short BufSize, short *refnum, MIDIPortParamsPtr init)
  303. ;
  304.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  305.         Macro
  306.         _MIDIAddPort
  307.             move.l              #$001C0004,D0
  308.             dc.w                $A800
  309.         EndM
  310.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  311.         IMPORT_CFM_FUNCTION MIDIAddPort
  312.     ENDIF
  313.  
  314. ;
  315. ; pascal MIDIPortInfoHandle MIDIGetPortInfo(OSType clientID, OSType portID)
  316. ;
  317.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  318.         Macro
  319.         _MIDIGetPortInfo
  320.             move.l              #$00200004,D0
  321.             dc.w                $A800
  322.         EndM
  323.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  324.         IMPORT_CFM_FUNCTION MIDIGetPortInfo
  325.     ENDIF
  326.  
  327. ;
  328. ; pascal OSErr MIDIConnectData(OSType srcClID, OSType srcPortID, OSType dstClID, OSType dstPortID)
  329. ;
  330.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  331.         Macro
  332.         _MIDIConnectData
  333.             move.l              #$00240004,D0
  334.             dc.w                $A800
  335.         EndM
  336.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  337.         IMPORT_CFM_FUNCTION MIDIConnectData
  338.     ENDIF
  339.  
  340. ;
  341. ; pascal OSErr MIDIUnConnectData(OSType srcClID, OSType srcPortID, OSType dstClID, OSType dstPortID)
  342. ;
  343.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  344.         Macro
  345.         _MIDIUnConnectData
  346.             move.l              #$00280004,D0
  347.             dc.w                $A800
  348.         EndM
  349.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  350.         IMPORT_CFM_FUNCTION MIDIUnConnectData
  351.     ENDIF
  352.  
  353. ;
  354. ; pascal OSErr MIDIConnectTime(OSType srcClID, OSType srcPortID, OSType dstClID, OSType dstPortID)
  355. ;
  356.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  357.         Macro
  358.         _MIDIConnectTime
  359.             move.l              #$002C0004,D0
  360.             dc.w                $A800
  361.         EndM
  362.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  363.         IMPORT_CFM_FUNCTION MIDIConnectTime
  364.     ENDIF
  365.  
  366. ;
  367. ; pascal OSErr MIDIUnConnectTime(OSType srcClID, OSType srcPortID, OSType dstClID, OSType dstPortID)
  368. ;
  369.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  370.         Macro
  371.         _MIDIUnConnectTime
  372.             move.l              #$00300004,D0
  373.             dc.w                $A800
  374.         EndM
  375.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  376.         IMPORT_CFM_FUNCTION MIDIUnConnectTime
  377.     ENDIF
  378.  
  379. ;
  380. ; pascal void MIDIFlush(short refnum)
  381. ;
  382.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  383.         Macro
  384.         _MIDIFlush
  385.             move.l              #$00340004,D0
  386.             dc.w                $A800
  387.         EndM
  388.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  389.         IMPORT_CFM_FUNCTION MIDIFlush
  390.     ENDIF
  391.  
  392. ;
  393. ; pascal ProcPtr MIDIGetReadHook(short refnum)
  394. ;
  395.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  396.         Macro
  397.         _MIDIGetReadHook
  398.             move.l              #$00380004,D0
  399.             dc.w                $A800
  400.         EndM
  401.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  402.         IMPORT_CFM_FUNCTION MIDIGetReadHook
  403.     ENDIF
  404.  
  405. ;
  406. ; pascal void MIDISetReadHook(short refnum, ProcPtr hook)
  407. ;
  408.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  409.         Macro
  410.         _MIDISetReadHook
  411.             move.l              #$003C0004,D0
  412.             dc.w                $A800
  413.         EndM
  414.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  415.         IMPORT_CFM_FUNCTION MIDISetReadHook
  416.     ENDIF
  417.  
  418. ;
  419. ; pascal void MIDIGetPortName(OSType clientID, OSType portID, Str255 name)
  420. ;
  421.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  422.         Macro
  423.         _MIDIGetPortName
  424.             move.l              #$00400004,D0
  425.             dc.w                $A800
  426.         EndM
  427.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  428.         IMPORT_CFM_FUNCTION MIDIGetPortName
  429.     ENDIF
  430.  
  431. ;
  432. ; pascal void MIDISetPortName(OSType clientID, OSType portID, ConstStr255Param name)
  433. ;
  434.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  435.         Macro
  436.         _MIDISetPortName
  437.             move.l              #$00440004,D0
  438.             dc.w                $A800
  439.         EndM
  440.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  441.         IMPORT_CFM_FUNCTION MIDISetPortName
  442.     ENDIF
  443.  
  444. ;
  445. ; pascal void MIDIWakeUp(short refnum, long time, long period, MIDITimeUPP timeProc)
  446. ;
  447.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  448.         Macro
  449.         _MIDIWakeUp
  450.             move.l              #$00480004,D0
  451.             dc.w                $A800
  452.         EndM
  453.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  454.         IMPORT_CFM_FUNCTION MIDIWakeUp
  455.     ENDIF
  456.  
  457. ;
  458. ; pascal void MIDIRemovePort(short refnum)
  459. ;
  460.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  461.         Macro
  462.         _MIDIRemovePort
  463.             move.l              #$004C0004,D0
  464.             dc.w                $A800
  465.         EndM
  466.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  467.         IMPORT_CFM_FUNCTION MIDIRemovePort
  468.     ENDIF
  469.  
  470. ;
  471. ; pascal short MIDIGetSync(short refnum)
  472. ;
  473.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  474.         Macro
  475.         _MIDIGetSync
  476.             move.l              #$00500004,D0
  477.             dc.w                $A800
  478.         EndM
  479.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  480.         IMPORT_CFM_FUNCTION MIDIGetSync
  481.     ENDIF
  482.  
  483. ;
  484. ; pascal void MIDISetSync(short refnum, short sync)
  485. ;
  486.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  487.         Macro
  488.         _MIDISetSync
  489.             move.l              #$00540004,D0
  490.             dc.w                $A800
  491.         EndM
  492.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  493.         IMPORT_CFM_FUNCTION MIDISetSync
  494.     ENDIF
  495.  
  496. ;
  497. ; pascal long MIDIGetCurTime(short refnum)
  498. ;
  499.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  500.         Macro
  501.         _MIDIGetCurTime
  502.             move.l              #$00580004,D0
  503.             dc.w                $A800
  504.         EndM
  505.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  506.         IMPORT_CFM_FUNCTION MIDIGetCurTime
  507.     ENDIF
  508.  
  509. ;
  510. ; pascal void MIDISetCurTime(short refnum, long time)
  511. ;
  512.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  513.         Macro
  514.         _MIDISetCurTime
  515.             move.l              #$005C0004,D0
  516.             dc.w                $A800
  517.         EndM
  518.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  519.         IMPORT_CFM_FUNCTION MIDISetCurTime
  520.     ENDIF
  521.  
  522. ;
  523. ; pascal void MIDIStartTime(short refnum)
  524. ;
  525.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  526.         Macro
  527.         _MIDIStartTime
  528.             move.l              #$00600004,D0
  529.             dc.w                $A800
  530.         EndM
  531.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  532.         IMPORT_CFM_FUNCTION MIDIStartTime
  533.     ENDIF
  534.  
  535. ;
  536. ; pascal void MIDIStopTime(short refnum)
  537. ;
  538.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  539.         Macro
  540.         _MIDIStopTime
  541.             move.l              #$00640004,D0
  542.             dc.w                $A800
  543.         EndM
  544.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  545.         IMPORT_CFM_FUNCTION MIDIStopTime
  546.     ENDIF
  547.  
  548. ;
  549. ; pascal void MIDIPoll(short refnum, long offsetTime)
  550. ;
  551.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  552.         Macro
  553.         _MIDIPoll
  554.             move.l              #$00680004,D0
  555.             dc.w                $A800
  556.         EndM
  557.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  558.         IMPORT_CFM_FUNCTION MIDIPoll
  559.     ENDIF
  560.  
  561. ;
  562. ; pascal OSErr MIDIWritePacket(short refnum, MIDIPacketPtr packet)
  563. ;
  564.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  565.         Macro
  566.         _MIDIWritePacket
  567.             move.l              #$006C0004,D0
  568.             dc.w                $A800
  569.         EndM
  570.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  571.         IMPORT_CFM_FUNCTION MIDIWritePacket
  572.     ENDIF
  573.  
  574. ;
  575. ; pascal Boolean MIDIWorldChanged(OSType clientID)
  576. ;
  577.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  578.         Macro
  579.         _MIDIWorldChanged
  580.             move.l              #$00700004,D0
  581.             dc.w                $A800
  582.         EndM
  583.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  584.         IMPORT_CFM_FUNCTION MIDIWorldChanged
  585.     ENDIF
  586.  
  587. ;
  588. ; pascal long MIDIGetOffsetTime(short refnum)
  589. ;
  590.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  591.         Macro
  592.         _MIDIGetOffsetTime
  593.             move.l              #$00740004,D0
  594.             dc.w                $A800
  595.         EndM
  596.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  597.         IMPORT_CFM_FUNCTION MIDIGetOffsetTime
  598.     ENDIF
  599.  
  600. ;
  601. ; pascal void MIDISetOffsetTime(short refnum, long offsetTime)
  602. ;
  603.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  604.         Macro
  605.         _MIDISetOffsetTime
  606.             move.l              #$00780004,D0
  607.             dc.w                $A800
  608.         EndM
  609.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  610.         IMPORT_CFM_FUNCTION MIDISetOffsetTime
  611.     ENDIF
  612.  
  613. ;
  614. ; pascal long MIDIConvertTime(short srcFormat, short dstFormat, long time)
  615. ;
  616.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  617.         Macro
  618.         _MIDIConvertTime
  619.             move.l              #$007C0004,D0
  620.             dc.w                $A800
  621.         EndM
  622.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  623.         IMPORT_CFM_FUNCTION MIDIConvertTime
  624.     ENDIF
  625.  
  626. ;
  627. ; pascal long MIDIGetRefCon(short refnum)
  628. ;
  629.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  630.         Macro
  631.         _MIDIGetRefCon
  632.             move.l              #$00800004,D0
  633.             dc.w                $A800
  634.         EndM
  635.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  636.         IMPORT_CFM_FUNCTION MIDIGetRefCon
  637.     ENDIF
  638.  
  639. ;
  640. ; pascal void MIDISetRefCon(short refnum, long refCon)
  641. ;
  642.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  643.         Macro
  644.         _MIDISetRefCon
  645.             move.l              #$00840004,D0
  646.             dc.w                $A800
  647.         EndM
  648.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  649.         IMPORT_CFM_FUNCTION MIDISetRefCon
  650.     ENDIF
  651.  
  652. ;
  653. ; pascal long MIDIGetClRefCon(OSType clientID)
  654. ;
  655.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  656.         Macro
  657.         _MIDIGetClRefCon
  658.             move.l              #$00880004,D0
  659.             dc.w                $A800
  660.         EndM
  661.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  662.         IMPORT_CFM_FUNCTION MIDIGetClRefCon
  663.     ENDIF
  664.  
  665. ;
  666. ; pascal void MIDISetClRefCon(OSType clientID, long refCon)
  667. ;
  668.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  669.         Macro
  670.         _MIDISetClRefCon
  671.             move.l              #$008C0004,D0
  672.             dc.w                $A800
  673.         EndM
  674.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  675.         IMPORT_CFM_FUNCTION MIDISetClRefCon
  676.     ENDIF
  677.  
  678. ;
  679. ; pascal short MIDIGetTCFormat(short refnum)
  680. ;
  681.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  682.         Macro
  683.         _MIDIGetTCFormat
  684.             move.l              #$00900004,D0
  685.             dc.w                $A800
  686.         EndM
  687.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  688.         IMPORT_CFM_FUNCTION MIDIGetTCFormat
  689.     ENDIF
  690.  
  691. ;
  692. ; pascal void MIDISetTCFormat(short refnum, short format)
  693. ;
  694.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  695.         Macro
  696.         _MIDISetTCFormat
  697.             move.l              #$00940004,D0
  698.             dc.w                $A800
  699.         EndM
  700.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  701.         IMPORT_CFM_FUNCTION MIDISetTCFormat
  702.     ENDIF
  703.  
  704. ;
  705. ; pascal void MIDISetRunRate(short refnum, short rate, long time)
  706. ;
  707.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  708.         Macro
  709.         _MIDISetRunRate
  710.             move.l              #$00980004,D0
  711.             dc.w                $A800
  712.         EndM
  713.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  714.         IMPORT_CFM_FUNCTION MIDISetRunRate
  715.     ENDIF
  716.  
  717. ;
  718. ; pascal Handle MIDIGetClientIcon(OSType clientID)
  719. ;
  720.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  721.         Macro
  722.         _MIDIGetClientIcon
  723.             move.l              #$009C0004,D0
  724.             dc.w                $A800
  725.         EndM
  726.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  727.         IMPORT_CFM_FUNCTION MIDIGetClientIcon
  728.     ENDIF
  729.  
  730. ;
  731. ; pascal ProcPtr MIDICallAddress(short callNum)
  732. ;
  733.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  734.         Macro
  735.         _MIDICallAddress
  736.             move.l              #$00A40004,D0
  737.             dc.w                $A800
  738.         EndM
  739.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  740.         IMPORT_CFM_FUNCTION MIDICallAddress
  741.     ENDIF
  742.  
  743. ;
  744. ; pascal void MIDISetConnectionProc(short refNum, ProcPtr connectionProc, long refCon)
  745. ;
  746.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  747.         Macro
  748.         _MIDISetConnectionProc
  749.             move.l              #$00A80004,D0
  750.             dc.w                $A800
  751.         EndM
  752.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  753.         IMPORT_CFM_FUNCTION MIDISetConnectionProc
  754.     ENDIF
  755.  
  756. ;
  757. ; pascal void MIDIGetConnectionProc(short refnum, ProcPtr *connectionProc, long *refCon)
  758. ;
  759.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  760.         Macro
  761.         _MIDIGetConnectionProc
  762.             move.l              #$00AC0004,D0
  763.             dc.w                $A800
  764.         EndM
  765.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  766.         IMPORT_CFM_FUNCTION MIDIGetConnectionProc
  767.     ENDIF
  768.  
  769. ;
  770. ; pascal void MIDIDiscardPacket(short refnum, MIDIPacketPtr packet)
  771. ;
  772.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  773.         Macro
  774.         _MIDIDiscardPacket
  775.             move.l              #$00B00004,D0
  776.             dc.w                $A800
  777.         EndM
  778.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  779.         IMPORT_CFM_FUNCTION MIDIDiscardPacket
  780.     ENDIF
  781.  
  782. ;
  783. ; pascal OSErr MDVRSignIn(OSType clientID, long refCon, Handle icon, Str255 name)
  784. ;
  785.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  786.         Macro
  787.         _MDVRSignIn
  788.             move.l              #$00B40004,D0
  789.             dc.w                $A800
  790.         EndM
  791.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  792.         IMPORT_CFM_FUNCTION MDVRSignIn
  793.     ENDIF
  794.  
  795. ;
  796. ; pascal void MDVRSignOut(OSType clientID)
  797. ;
  798.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  799.         Macro
  800.         _MDVRSignOut
  801.             move.l              #$00B80004,D0
  802.             dc.w                $A800
  803.         EndM
  804.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  805.         IMPORT_CFM_FUNCTION MDVRSignOut
  806.     ENDIF
  807.  
  808. ;
  809. ; pascal MDVRPtr MDVROpen(short portType, short refnum)
  810. ;
  811.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  812.         Macro
  813.         _MDVROpen
  814.             move.l              #$00BC0004,D0
  815.             dc.w                $A800
  816.         EndM
  817.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  818.         IMPORT_CFM_FUNCTION MDVROpen
  819.     ENDIF
  820.  
  821. ;
  822. ; pascal void MDVRClose(MDVRPtr driverPtr)
  823. ;
  824.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  825.         Macro
  826.         _MDVRClose
  827.             move.l              #$00C00004,D0
  828.             dc.w                $A800
  829.         EndM
  830.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  831.         IMPORT_CFM_FUNCTION MDVRClose
  832.     ENDIF
  833.  
  834. ;
  835. ; pascal void MDVRControlIn(MDVRPtr portPtr, MDVRInCtlPtr inputCtl)
  836. ;
  837.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  838.         Macro
  839.         _MDVRControlIn
  840.             move.l              #$00C40004,D0
  841.             dc.w                $A800
  842.         EndM
  843.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  844.         IMPORT_CFM_FUNCTION MDVRControlIn
  845.     ENDIF
  846.  
  847. ;
  848. ; pascal void MDVRControlOut(MDVRPtr portPtr, MDVROutCtlPtr outputCtl)
  849. ;
  850.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  851.         Macro
  852.         _MDVRControlOut
  853.             move.l              #$00C80004,D0
  854.             dc.w                $A800
  855.         EndM
  856.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  857.         IMPORT_CFM_FUNCTION MDVRControlOut
  858.     ENDIF
  859.  
  860. ;
  861. ; pascal void MDVRIn(MDVRPtr portPtr)
  862. ;
  863.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  864.         Macro
  865.         _MDVRIn
  866.             move.l              #$00CC0004,D0
  867.             dc.w                $A800
  868.         EndM
  869.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  870.         IMPORT_CFM_FUNCTION MDVRIn
  871.     ENDIF
  872.  
  873. ;
  874. ; pascal void MDVROut(MDVRPtr portPtr, char *dataPtr, short length)
  875. ;
  876.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  877.         Macro
  878.         _MDVROut
  879.             move.l              #$00D00004,D0
  880.             dc.w                $A800
  881.         EndM
  882.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  883.         IMPORT_CFM_FUNCTION MDVROut
  884.     ENDIF
  885.  
  886. ;
  887. ; pascal void MDVRNotesOff(MDVRPtr portPtr, short mode)
  888. ;
  889.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  890.         Macro
  891.         _MDVRNotesOff
  892.             move.l              #$00D40004,D0
  893.             dc.w                $A800
  894.         EndM
  895.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  896.         IMPORT_CFM_FUNCTION MDVRNotesOff
  897.     ENDIF
  898.  
  899.  
  900.     ENDIF ; __MIDI__ 
  901.  
  902.